﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xplang.abstractions;
using xplang.run;
using xplang.expression;
using xplang.errors;

namespace xplang.rtl.operators
{

  public class SubtractableClass : NativeClass
  {

    public const String opMinus = "-";
    public ClassMethod mMinus;

    public SubtractableClass()
      : base(RTL.rtl, "Subtractable")
    {      
      inheritance = new ClassRef[] { };
      genericParams = new GenericParamDecl[] 
      { 
        xplang.rtl.RTL.rightParamType
      };
    }

    public override void registerMembers()
    {
      mMinus = new NativeClassMethod(this, Modifier.None,
        xplang.rtl.RTL.booleanClass.getRef(null),
        opMinus,
        new Variable[] { xplang.rtl.RTL.rightParam });
      methods.Add(mMinus);
    }

    public override object newInstance()
    {
      throw new AbstractInstanciation();
    }

    public override Value getAttributeValue(Value _this, Variable variable)
    {
      throw new NotImplementedException();
    }

    public override void setAttributeValue(Value _this, Variable variable, Value obj)
    {
      throw new NotImplementedException();
    }
  }
}
